Resource URL: /platform/<<version=3>>/cloud/accounts/<ACCOUNT>

    Overview: This resource applies the standard collection item pattern to
              individual OneFS cloud accounts. ACCOUNT in the resource path is
              the account name.

     Methods: GET, PUT, DELETE

********************************************************************************

Method GET: Retrieve cloud account information.

       URL: GET /platform/<<version=3>>/cloud/accounts/<ACCOUNT>

Query arguments:

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "accounts": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "description": "A cloud account object", 
            "properties": {
              "account_id": {
                "type": [
                  "string", 
                  "integer"
                ], 
                "description": "(S3 only) The user id of the S3 account"
              }, 
              "metadata_bucket": {
                "type": "string", 
                "description": "The machine generated name of the account bucket to store metadata"
              }, 
              "account_username": {
                "type": "string", 
                "description": "The username required to authenticate against the cloud service"
              }, 
              "birth_cluster_id": {
                "type": "string", 
                "description": "The guid of the cluster where this account was created"
              }, 
              "telemetry_bucket": {
                "type": "string", 
                "description": "(S3 only) The name of the bucket into which generated metrics reports are placed by the cloud service provider"
              }, 
              "bucket": {
                "type": "string", 
                "description": "The machine generated name of the account bucket to store data"
              }, 
              "uri": {
                "type": "string", 
                "description": "A valid URI pointing to the location of the cloud storage"
              }, 
              "storage_region": {
                "type": [
                  "string", 
                  "null"
                ], 
                "description": "An appropriate region for the account as defined by the cloud service provider.  For example, faster access times may be gained by referencing a nearby region"
              }, 
              "state_details": {
                "type": "string", 
                "description": "Gives further information to describe the state of this account"
              }, 
              "state": {
                "enum": [
                  "OK", 
                  "disabled", 
                  "unreachable"
                ], 
                "type": "string", 
                "description": "Indicates whether this account is in a good state (\"OK\"), disabled (\"disabled\") or inaccessible via the network (\"unreachable\")"
              }, 
              "pool": {
                "type": "string", 
                "description": "Name of the pool referencing this account.  Empty if none."
              }, 
              "key": {
                "type": "string", 
                "description": "A valid authentication key for connecting to the cloud"
              }, 
              "skip_ssl_validation": {
                "type": "boolean", 
                "description": "Indicates whether to skip SSL certificate validation when connecting to the cloud"
              }, 
              "type": {
                "enum": [
                  "isilon", 
                  "ecs", 
                  "virtustream", 
                  "azure", 
                  "s3", 
                  "google", 
                  "ran", 
                  "ecs2"
                ], 
                "type": "string", 
                "description": "The type of cloud protocol required.  E.g., \"isilon\" for EMC Isilon, \"ecs\" for EMC ECS Appliance, \"virtustream\" for Virtustream Storage Cloud, \"azure\" for Microsoft Azure, \"s3\" for Amazon S3 and \"google\" for Google Cloud Platform"
              }, 
              "id": {
                "type": "string", 
                "description": "A globally unique name for this account"
              }, 
              "enabled": {
                "type": "boolean", 
                "description": "Whether this account is explicitly enabled or disabled by a user"
              }, 
              "name": {
                "type": "string", 
                "description": "A unique name for this account"
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }, 
        "resume": {
          "minLength": 0, 
          "type": [
            "string", 
            "null"
          ], 
          "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
        }
      }
    }
  ]
}

********************************************************************************

Method PUT: Modify cloud account.  All fields are optional, but one or more
            must be supplied.

       URL: PUT /platform/<<version=3>>/cloud/accounts/<ACCOUNT>

There are no query arguments for this method.

PUT request body schema:
{
  "type": "object", 
  "description": "A cloud account object", 
  "properties": {
    "account_id": {
      "type": [
        "string", 
        "integer"
      ], 
      "description": "(S3 only) The user id of the S3 account"
    }, 
    "account_username": {
      "type": "string", 
      "description": "The username required to authenticate against the cloud service"
    }, 
    "birth_cluster_id": {
      "type": "string", 
      "description": "The guid of the cluster where this account was created"
    }, 
    "telemetry_bucket": {
      "type": "string", 
      "description": "(S3 only) The name of the bucket into which generated metrics reports are placed by the cloud service provider"
    }, 
    "enabled": {
      "type": "boolean", 
      "description": "Whether this account is explicitly enabled or disabled by a user"
    }, 
    "uri": {
      "type": "string", 
      "description": "A valid URI pointing to the location of the cloud storage"
    }, 
    "storage_region": {
      "type": [
        "string", 
        "null"
      ], 
      "description": "An appropriate region for the account as defined by the cloud service provider.  For example, faster access times may be gained by referencing a nearby region"
    }, 
    "key": {
      "type": "string", 
      "description": "A valid authentication key for connecting to the cloud"
    }, 
    "skip_ssl_validation": {
      "type": "boolean", 
      "description": "Indicates whether to skip SSL certificate validation when connecting to the cloud"
    }, 
    "name": {
      "type": "string", 
      "description": "A unique name for this account"
    }
  }
}

There is no JSON response body for this method.

********************************************************************************

Method DELETE: Delete cloud account.

          URL: DELETE /platform/<<version=3>>/cloud/accounts/<ACCOUNT>

Query arguments:
acknowledge_force_delete=<string> A value of 1 acknowledges that the user is
                                  deleting data.

There is no JSON response body for this method.
